﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Strategy.Core
{
    internal class AEvent
    {
        public AState  StartState { get; protected set; }
        public AState  EndState   { get; protected set; }
        public string  Name       { get; protected set; }
        public IAction Action     { get; protected set; }

        public AEvent(string name,
                      AState _startstate,
                      AState _endstate,
                      IAction Action)
        {
            StartState = _startstate;
            EndState = _endstate;
            Name = name;
            this.Action = Action;
        }
        public AState Go()
        {
            Action.DoAction();
            return EndState;
        }
    }
}
